<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
				<div class="detail_r">
					<div class="renz">
						<div class="price"><span id="serverVal">￥0</span>/晚</div>
						<div class="add"  id="hostAdd"></div>
						<div class="yuyue"><a href="javascript:tendog.win.order('${param['id']}')"></a></div>
					</div>
					<div id="userInfo" class="news news_hostcard">
						<div class="user_img"><img src="${ctx}/images/user_no_head.jpg" width="100" height="100"/></div>
						<div class="user_m">
							<h3></h3>
							<span>宠物饲养经验：<em class="white_font"></em> 年</span><br />
							<a href="javascript:tendog.win.createMsg()">问题咨询</a>
							<a class="like" href="javascript:favoritesHost('${param['id']}')">收藏旅店</a>
						</div>
						<div class="share" style="display: none;">
						 	<!-- Baidu Button BEGIN -->
							<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
								<a class="bds_qzone"></a>
								<a class="bds_kaixin001"></a>
								<a class="bds_renren"></a>
								<a class="bds_tqq"></a>
								<a class="bds_tsina"></a>
								<a class="bds_sqq"></a>
								<a class="bds_t163"></a>
								<a class="bds_tsohu"></a>
							<span class="bds_more">更多</span>
							</div>
							<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=3159570" ></script>
							<script type="text/javascript" id="bdshell_js"></script>
							<script type="text/javascript">
								document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);
							</script>
							<!-- Baidu Button END -->
						</div>
					</div>
					<div class="news">
						<h2 class="news_tit">服务及价格</h2>
						<ul id="server_list">
						</ul>
					</div>
					<div class="news news_hostpets" id="user_pet_list">
						<h2 class="news_tit">主人家的宠物</h2>
					</div>
				</div>
				
			<script type="text/javascript">
			function showUser(userId){
				$.getJSON("${ctx}/show/user.do?id=" + userId, function(user) {
					$("#userInfo > .user_img > img").attr("src", "${ctx}/tools/download.do?dir=HEAD&fileName=" + user.userPhotoPath).error(function(){
						$(this).attr("src", "${ctx}/images/user_no_head.jpg");
					}).imgAuto();
					$("#userInfo > .user_m > h3").html(user.userNickName);
					$.each(user.userPetList, function(i, pet){
						var $pet = $("<div></div>").addClass("mar");
						var imgSrc = "${ctx}/images/pet_no_head.jpg";
						if(pet.petPhotoPath) {
							imgSrc = "${ctx}/tools/download.do?dir=PET&fileName=" + pet.petPhotoPath;
						}
						var $petHead = $("<img width='100' height='100'/>").attr("src", imgSrc);
						$pet.append($petHead);
						$petHead.wrap("<div class='user_img'></div>");
						var $petInfo = $("<div class='pet'></div>");
						$pet.append($petInfo);
						$petInfo.append("<h3>" + pet.petName + "</h3>");
						$petInfo.append(pet.petSomatotype + "<br/>");
						$petInfo.append((pet.petSex==1?"男孩":"女孩") + "<br/>");
						if(pet.petAge) {
							$petInfo.append(pet.petAge + "岁");
						}
						$("#user_pet_list").append($pet);
						
						$petHead.imgAuto();
					});
					
					
				});
			}
			


			function favoritesHost(hostId) {
				$.getJSON("${ctx}/fvt/add.do?id=" + hostId, function(res){
					if(res.code==1) {
						msg.alert("收藏成功！");
					}else if(res.code==2) {
						msg.alert("已收藏过该店铺！");
					} else {
						msg.error(res.msg);
					}
				});
			}
			</script>